#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: check_interval_with_lock.py 
@version:
@time: 2023/04/20 
"""
import threading

n = 0
lock = threading.Lock()


def foo():
    global n
    with lock:
        n += 1
